package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.Bean;
import com.sgb.kjwl.model.entity.NeedDetailsEntity;
import com.sgb.kjwl.model.entity.enterprise.MyNeedQuoteDatailEntity;
import com.sgb.kjwl.model.entity.enterprise.MyNeedQuoteListEntity;
import com.sgb.kjwl.model.entity.enterprise.NeedEntity;
import com.sgb.kjwl.model.entity.enterprise.NeedListItemEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface NeedAPI {

    // 获取商标类型选项
    @POST("v1/app/enterpriseServices/demandHall/getTrademarkTypeOption")
    Call<BaseEntity<List<Bean>>> getTrademarkTypeOption();

    // 获取所有版权
    @POST("v1/app/enterpriseServices/demandHall/getAllQualification")
    Call<BaseEntity<List<Bean>>> getAllQualification();

    // 获取领域分类
    @POST("v1/app/enterpriseServices/demandHall/getAllCopyright")
    Call<BaseEntity<List<Bean>>> getAllCopyright();

    // 行业分类
    @POST("v1/app/enterpriseServices/demandHall/getAllSserviceCategory")
    Call<BaseEntity<List<Bean>>> getAllSserviceCategory();

    // 需求大厅列表
    @POST("v1/app/enterpriseServices/demandHall/getDemandHallList")
    Call<BaseEntity<NeedEntity>> getDemandHallList(@Body Map map);

    // 搜索 需求大厅列表
    @POST("v1/app/enterpriseServices/search/getDemandList")
    Call<BaseEntity<NeedEntity>> getDemandList(@Body Map map);

    // 需求详情
    @GET("v1/app/enterpriseServices/demandHall/getDetails")
    Call<BaseEntity<NeedDetailsEntity>> getDetails(@Query("id") String id);

    @GET("v1/app/enterpriseServices/patent/getPatentTypeOption")
    Call<BaseEntity<List<Bean>>> getPatentTypeOption();

    // 发布需求
    @POST("v1/app/serviceRelease/demand/saveDemand")
    Call<BaseEntity<Object>> publishNeedMessage(@Body Map map);

    //已发布的需求
    @POST("v1/app/serviceRelease/demand/getListInfoByPersonal")
    Call<BaseEntity<ListResponse<List<NeedListItemEntity>>>> getListInfoByPersonalAddNeed(@Body Map map);


    /**
     * 上架下架需求
     */
    @POST("v1/app/serviceRelease/demand/enable")
    Call<BaseEntity<Object>> updateNeedMessageType(@Query("id")long id,@Query("status") String status);

    /**
     * 删除需求
     */
    @POST("v1/app/serviceRelease/demand/del")
    Call<BaseEntity<Object>> delNeedMessageType(@Query("id")long id);
    /**
     * 编辑需求
     */
    @POST("v1/app/serviceRelease/demand/update")
    Call<BaseEntity<Object>> updateNeedMessage(@Body Map map);

    /**
     * 是否可以报价
     */
    @GET("v1/app/enterpriseServices/demandHall/goQuotation")
    Call<BaseEntity<Object>> goQuotation(@Query("id") String id, @Query("no") String no, @Query("type") String type, @Query("userAccount") String userAccount);
    /**
     * 发布报价
     */
    @POST("v1/app/enterpriseServices/demandHall/saveQuotation")
    Call<BaseEntity<Object>> publishNeedQuote(@Body Map map);

    //我的报价列表
    @POST("v1/app/enterpriseServices/demandHall/demandOfferList")
    Call<BaseEntity<List<MyNeedQuoteListEntity>>> getDemandOfferList(@Body Map map);

    // 我的报价详情
    @GET("v1/app/enterpriseServices/demandHall/getQuotationData")
    Call<BaseEntity<MyNeedQuoteDatailEntity>> getQuotationData(@Query("xqid") String xqid, @Query("bjid") String bjid);
}
